<?php namespace App\Http\Requests;

use App\Http\Requests\Request;

class ProjectNewsRequest extends Request {

	/**
	 * Determine if the user is authorized to make this request.
	 *
	 * @return bool
	 */
	public function authorize()
	{
		return true;
	}

    public function attributes()
    {
        return [
            'project_id'    =>  '项目标识',
            'news_title'    =>  '新闻标题',
            'news_intro'    =>  '新闻介绍',
            'news_comment'  =>  '新闻内容',
            'news_tags'     =>  '新闻标签',
            'news_time'     =>  '新闻发布时间'
        ];
    }
	/**
	 * Get the validation rules that apply to the request.
	 *
	 * @return array
	 */
	public function rules()
	{
		return [
            'project_id'    =>  'required',
            'news_title'    =>  'required',
            'news_intro'    =>  'required_with:news_title',
            'news_comment'  =>  'required_with:news_title',
            'news_tags'     =>  'required_with:news_title',
		];
	}

}
